Lesson 7 - newbie exercise

For each scenario write code to solve it.

Scenario - Convert a normal denary number into binary. You will need to use modulus (%) in your answer..

Toggle answer

Scenario - Throw a coin 50 times and count the number of times heads and tails comes up.

Toggle answer

Scenario - Calculate the speed of a object (speed = distance / time)

Toggle answer